package com.bobo.controller.base;

import com.bobo.service.category.CategoryServiceImpl;
import com.bobo.service.category.ICategoryService;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created by bobo on 16-11-5.
 */
public class InitServlet extends HttpServlet {



    private ICategoryService categoryService = new CategoryServiceImpl();

    @Override
    public void init(ServletConfig config) throws ServletException {
        super.init(config);

        this.getServletContext().setAttribute("headerNav", categoryService.getCategories(1));

    }
}
